You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
Tip: Go to your accessibility settings to change your keyboard shortcuts
Type ? for help and tips
Tip: Type author:@me to search your content
Type ? for help and tips
Tip: Type is:pr to filter to pull requests
Type ? for help and tips
Tip: Type is:issue to filter to issues
Type ? for help and tips
Tip: Type is:project to filter to projects
Type ? for help and tips
Tip: Type is:open to filter to open content
Type ? for help and tips
We’ve encountered an error and some results aren't available at this time. Type a new search or try again later.
No results matched your search
Top result
Commands Type > to filter
Global Commands Type > to filter
This Page
Files
Pages
Access Policies
Organizations
Repositories
Issues, pull requests, and discussions Type # to filter
Teams
Users
Projects
Projects (classic)
Modes
Use filters in issues, pull requests, discussions, and projects
Search for issues and pull requests#Search for issues, pull requests, discussions, and projects#Search for organizations, repositories, and users@Search for projects!Search for files/Activate command mode>Search your issues, pull requests, and discussions# author:@meSearch your issues, pull requests, and discussions# author:@meFilter to pull requests# is:prFilter to issues# is:issueFilter to discussions# is:discussionFilter to projects# is:projectFilter to open issues, pull requests, and discussions# is:open
behaviorLib.MidItems= {"Item_Pierce 1", "Item_Immunity", "Item_Pierce 3"} --Pierce is Shieldbreaker, Immunity is Shrunken Head
behaviorLib.LateItems= {"Item_Weapon3", "Item_Sicarius", "Item_ManaBurn2", "Item_BehemothsHeart", "Item_Damage9" } --Weapon3 is Savage Mace. Item_Sicarius is Firebrand. ManaBurn2 is Geomenter's Bane. Item_Damage9 is Doombringer
behaviorLib.buyState=behaviorLib.BuyStateUnknown
behaviorLib.curItemList= {}
functionbehaviorLib.ProcessItemCode(itemCode)
localnum=1
locallevel=1
localitem=itemCode
localpos=strfind(itemCode, "")
ifposthen
localnumTemp=strsub(itemCode, 1, pos-1)
iftonumber(numTemp) ~=nilthen
num=tonumber(numTemp)
item=strsub(itemCode, pos+1)
end
end
pos=strfind(item, "")
ifposthen
locallevelTemp=strsub(item, pos+1)
iftonumber(levelTemp) ~=nilthen
level=tonumber(levelTemp)
item=strsub(item, 1, pos-1)
end
end
returnitem, num, level
end
functionbehaviorLib.DetermineBuyState(botBrain)
--This is for determining where in our buy pattern we are. We need this for when we dynamically reload the script.
BotEcho(" Checking if "..tostring(slot)..", "..curItem:GetName().." is a component")
BotEcho(" NextItem Type check: "..tostring(curItem:GetTypeID()).." ~= "..tostring(nextItemDef:GetTypeID()).." is "..tostring(curItem:GetTypeID() ~=nextItemDef:GetTypeID()))
BotEcho(" Component Type check: "..tostring(curItem:GetTypeID()).." == "..tostring(compDef:GetTypeID()).." is "..tostring(curItem:GetTypeID() ==compDef:GetTypeID()))
ifshoppingLib.bDebugInfoShoppingFunctionsthenBotEcho("Remaining Components:") end
for_, itemCompDefinipairs (tReaminingItems) do
ifitemCompDefthen
localsDefName=itemCompDef:GetName()
ifshoppingLib.bDebugInfoShoppingFunctionsthenBotEcho("Component "..sDefName) end
--only insert component if it not an autocombined element
ifsDefName~=sNameornotitemCompDef:GetAutoAssemble() then
tinsert(shoppingLib.tShoppingList, itemCompDef)
end
end
end
else
ifshoppingLib.bDebugInfoShoppingFunctionsthenBotEcho("No remaining components. Skip this item (If you want more items of this type increase number)") end
returnGetNextItem()
end
end
ifshoppingLib.bDebugInfoShoppingFunctionsthenBotEcho("bKeepShopping? "..tostring(bKeepShopping)) end
returnbKeepShopping
end
--function Print All
--[[
description: Print Your itembuild-list, your current itembuild-list position and your shopping-list
ifshoppingLib.bDebugInfoShoppingFunctionsthenBotEcho(tostring(shoppingLib.nNextItemBuildCheck).." Now "..tostring(nNow).." Force Update? "..tostring(bForceUpdate)) end
ifshoppingLib.bDebugInfoShoppingBehaviorthenBotEcho("No Purchase of "..itemNextDef:GetName()..". Unknown exception waiting for stash access to fix it.") end
shoppingLib.bPauseShopping=true
end
end
bChanged=bChangedorbGoldReduced
end
end
end
--finished buying
ifbChanged==falsethen
ifshoppingLib.bDebugInfoShoppingBehaviorthenBotEcho("Finished Buying!") end
shoppingLib.bFinishedBuying=true
shoppingLib.bStashFunctionActivation=true
localbCanAccessStash=unitSelf:CanAccessStash()
ifnotbCanAccessStashthen
ifshoppingLib.bDebugInfoShoppingBehaviorthenBotEcho("CourierStart") end
ifshoppingLib.bDebugInfoCourierRelatedthenBotEcho("Was this item tracked? Name: "..tostring(itemInSlot:GetName()).." Tracked: "..tostring(bIsTrackedItem)) end
ifbIsTrackedItemthen
ifshoppingLib.bDebugInfoCourierRelatedthenBotEcho("Swap "..tostring(nItemSlot).." with "..tostring(nSlot)) end
unitCourier:SwapItems(nItemSlot, nSlot)
end
tremove(shoppingLib.tCourierSlots)
nLastItemSlot=nLastItemSlot-1
end
end
localnCourierSlotsUsed=#shoppingLib.tCourierSlots
ifnCourierSlotsUsed==0then
bSuccess=true
else
ifshoppingLib.bDebugInfoCourierRelatedthenBotEcho("Still items remaining. Selling number of items: "..tostring(nCourierSlotsUsed)) end
shoppingLib.tMidItems= {"Item_Pierce 1", "Item_Immunity", "Item_Pierce 3"} --Pierce is Shieldbreaker, Immunity is Shrunken Head
shoppingLib.tLateItems= {"Item_Weapon3", "Item_Sicarius", "Item_ManaBurn2", "Item_BehemothsHeart", "Item_Damage9" } --Weapon3 is Savage Mace. Item_Sicarius is Firebrand. ManaBurn2 is Geomenter's Bane. Item_Damage9 is Doombringer
{"Item_ManaRegen3", "Item_Marchers", "Item_Striders", "Item_GraveLocket"} --ManaRegen3 is Ring of the Teacher
{"Item_ManaRegen3", "Item_Marchers", "Item_Striders", "Item_GraveLocket"} --ManaRegen3 is Ring of the Teacher
behaviorLib.MidItems=
shoppingLib.tMidItems=
{"Item_SacrificialStone", "Item_NomesWisdom", "Item_Astrolabe", "Item_Intelligence7"} --Intelligence7 is Staff of the Master
{"Item_SacrificialStone", "Item_NomesWisdom", "Item_Astrolabe", "Item_Intelligence7"} --Intelligence7 is Staff of the Master
behaviorLib.LateItems=
shoppingLib.tLateItems=
{"Item_Morph", "Item_BehemothsHeart", 'Item_Damage9'} --Morph is Sheepstick. Item_Damage9 is Doombringer
{"Item_Morph", "Item_BehemothsHeart", 'Item_Damage9'} --Morph is Sheepstick. Item_Damage9 is Doombringer
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Code
Work fast with our official CLI. Learn more.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Schnarchnase advanced shopping lib #18
Details
base: Community
Schnarchnase advanced shopping lib #18
Details
Changes from all commits
96b9ec2b4be469197834011437703c3940756f0c732046ac85c32f08a7e929e648cdfddcb63420690f6fb7c23661afbdc1974506bea1a14ef50f0a94265b0eef989eaDetails
File filter
Filter by extension
Details
Conversations
Details
Jump to
Details
Details
Details
Commit suggestions 0
Finish your review
There are no files selected for viewing
Details
Details
Details
Details
Details
Details
Details
Details